package com.summer.data.apt;

import com.summer.data.table.column.*;

import java.util.HashMap;
import java.util.Map;

public class Constant {

    public static Map<String, String> DATA_COLUMN_MAP = new HashMap<String, String>(){{
        put("String", StringColumn.class.getCanonicalName());
        put("Integer", IntegerColumn.class.getCanonicalName());

//        put("java.math.BigInteger", getTypeFullName("IntegerColumn"));

        put("Float", FloatColumn.class.getCanonicalName());

        put("Double", DoubleColumn.class.getCanonicalName());

        put("java.math.BigDecimal", DecimalColumn.class.getCanonicalName());

        put("java.time.LocalDate", DateColumn.class.getCanonicalName());
        put("java.time.LocalDateTime", DateTimeColumn.class.getCanonicalName());
        put("java.time.LocalTime", TimeColumn.class.getCanonicalName());
        put("java.sql.Timestamp", TimestampColumn.class.getCanonicalName());

//        put("java.util.Date", getTypeFullName("DateColumn"));
        // todo: ydfqy 完善类型 和 boolean 支持
    }};

    public static Map<String, String> COLUMN_DATA_MAP = new HashMap<String, String>();
    static {
        DATA_COLUMN_MAP.forEach((k, v) -> COLUMN_DATA_MAP.put(v, k));

        DATA_COLUMN_MAP.put("int", IntegerColumn.class.getCanonicalName());
        DATA_COLUMN_MAP.put("float", FloatColumn.class.getCanonicalName());
        DATA_COLUMN_MAP.put("double", DoubleColumn.class.getCanonicalName());
    }

}
